﻿using System;
using System.Data;
using MySql.Data.MySqlClient;

namespace Novapangeia.Repositorio
{
    public interface ISqlHelper : IDisposable
    {
        MySqlConnection Conn { get; set; }
        DataSet ExecuteDataSet(CommandType commandType, string sql);
        DataSet ExecuteDataSet(CommandType commandType, string sql, MySqlParameter[] parametros);
        bool ExecuteSql(CommandType commandType, string sql, MySqlParameter[] parametros);
        bool ExecuteSql(CommandType commandType, string sql);
        MySqlParameterCollection ExecuteSqlWithOutputParams(CommandType commandType, string sql, MySqlParameter[] parametros);
        MySqlDataReader ExecuteReader(CommandType commandType, string sql, MySqlParameter[] parametros, CommandBehavior commandBehavior);
        MySqlDataReader ExecuteReader(CommandType commandType, string sql, MySqlParameter[] parametros);
        MySqlDataReader ExecuteReader(CommandType commandType, string sql);
        void HandleError(string metodo, Exception ex);
        Object ExecuteScalar(CommandType commandType, string sql);
        Object ExecuteScalar(CommandType commandType, string sql, MySqlParameter[] mySqlParameter);
    }
}
